package http.util;

import main.robClass;
import main.strategy.SelectStrategyFactory;
import user.IUser;
import user.UserManager;

public class PrintUtil {
    public static void printTitle(String msg){
        robClass.logger.info("========================================="+msg+"=========================================");
    }
    public static void printError(IUser user,Thread cur_thread,String extra_msg){
        StackTraceElement stes = cur_thread.getStackTrace()[2];
        robClass.logger.info(user.getUsername() +" " +user.getStudentName()+" - "+ stes.getClassName()+ " - " +stes.getMethodName() +"  功能出现问题 :" + extra_msg);
    }
    public static void printError(IUser user,Thread cur_thread){
        StackTraceElement stes = cur_thread.getStackTrace()[2];
        robClass.logger.info(user.getUsername() +" " +user.getStudentName()+" - "+ stes.getClassName()+ " - " +stes.getMethodName() +"  功能出现问题 ");
    }
    public static void printError(IUser user,int num,Thread cur_thread){
        StackTraceElement stes = cur_thread.getStackTrace()[2];
        robClass.logger.info(user.getUsername() +" " +user.getStudentName()+" - "+ stes.getClassName()+ " - " +stes.getMethodName() +"  功能出现问题 - 正在重试 - 目前执行次数: " + num);
    }
    public static void showIntroduction(){
        robClass.logger.info("################挖田系统#################");
        robClass.logger.info("#########################################");
        robClass.logger.info("=================初级录入=================");
        robClass.logger.info("10.注册账号");
        robClass.logger.info("11.修改账号信息");
        robClass.logger.info("=================高级录入=================");
        robClass.logger.info("12.注册用户抢课信息");
        robClass.logger.info("13.登录尝试");
        robClass.logger.info("=================选择课程=================");
        robClass.logger.info("20.[选择]-体育课");
        robClass.logger.info("21.[选择]-公选课");
        robClass.logger.info("=================抢体育课=================");
        robClass.logger.info("50.[立刻抢课]-[个人]-体育课");
        robClass.logger.info("51.[定时抢课]-[个人]-体育课");
        robClass.logger.info("52.[立刻抢课]-[全体]-体育课");
        robClass.logger.info("53.[定时抢课]-[全体]-体育课");
        robClass.logger.info("54.[立刻狂暴抢课]-[个人]-体育课");
        robClass.logger.info("55.[立刻狂暴抢课]-[全体]-体育课");
        robClass.logger.info("================抢公选/创新课==============");
        robClass.logger.info("60.[立刻抢课]-[个人]-公选课");
        robClass.logger.info("61.[定时抢课]-[个人]-公选课");
        robClass.logger.info("62.[立刻抢课]-[全体]-公选课");
        robClass.logger.info("63.[定时抢课]-[全体]-公选课");
        robClass.logger.info("64.[立刻狂暴抢课]-[个人]-公选课");
        robClass.logger.info("65.[立刻狂暴抢课]-[全体]-公选课");
        robClass.logger.info("================其他管理==============");
        robClass.logger.info("70.手动备份课表");
        robClass.logger.info("100.自动密码撞库");
        robClass.logger.info("0.退出挖田");
        robClass.logger.info("#########################################");
        robClass.logger.info("################挖田系统################");


    }
}
